package xsxdjc.policy
public class Qszcj{
	public static Closure rule = {_context_ ->
		hc.bre.policy.CheckResult _result_ = new hc.bre.policy.CheckResult();
		_result_.rname = '缺省政策集';
		_result_.rpath = 'xsxdjc/policy/Qszcj';
		
		boolean _hited_ = false;
		boolean _hitToStop_ = false;
		if(!(_hited_ && _hitToStop_)){
			if({个人信息.性别 == 1}.call()){
				_hited_ = true;
				_result_.reasonList.add(new hc.bre.policy.CheckResultReason(reason:xsxdjc.PolicyReason.R0001,category:xsxdjc.PolicyCategory.forbidden));
			};
		};
		_hitToStop_ = true;
		
		if(!(_hited_ && _hitToStop_)){
			if({true}.call()){
				_hited_ = true;
				_result_.reasonList.add(new hc.bre.policy.CheckResultReason(reason:xsxdjc.PolicyReason.R0002,category:xsxdjc.PolicyCategory.highrisk));
			};
			if({false}.call()){
				_hited_ = true;
				_result_.reasonList.add(new hc.bre.policy.CheckResultReason(reason:xsxdjc.PolicyReason.R0003,category:xsxdjc.PolicyCategory.highrisk));
			};
		};
		_hitToStop_ = false;
		
		if(!(_hited_ && _hitToStop_)){
			if({true}.call()){
				_hited_ = true;
				_result_.reasonList.add(new hc.bre.policy.CheckResultReason(reason:xsxdjc.PolicyReason.R0004,category:xsxdjc.PolicyCategory.middlerisk));
			};
			if({}.call()){
				_hited_ = true;
				_result_.reasonList.add(new hc.bre.policy.CheckResultReason(reason:xsxdjc.PolicyReason.R0005,category:xsxdjc.PolicyCategory.middlerisk));
			};
		};
		_hitToStop_ = true;
		
		_result_.reasonList = _result_.reasonList.sort();
		_result_.categoryCode = _result_.reasonList?_result_.reasonList[0].categoryCode:'';
		
		return _result_;
	};
};